home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 May: Tool Chest / Dev.CD May 97 TC.toast / Sample Code / Snippets / Toolbox / Tabs LDEF 1.0 / Sources / BareBones.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-01-15  |  1.6 KB  |  145 lines  |  [TEXT/CWIE]

  1. /*
  2.     File:        BareBones.h
  3.  
  4.     Contains:    Common header file included by all source files
  5.  
  6.     Written by:    Chris White, Developer Technical Support
  7.     
  8.     Copyright:    © 1995 by Apple Computer, Inc., all rights reserved.
  9.     
  10.     Change History (most recent first):
  11.     
  12.             12/18/95            CW        First release
  13.  
  14. */
  15.  
  16.  
  17.  
  18. #ifndef __BAREBONES__
  19. #define __BAREBONES__
  20.  
  21.  
  22.  
  23. #ifndef __LISTS__
  24.     #include <Lists.h>
  25. #endif
  26.  
  27.  
  28.  
  29. #define DEBUGGING    1        // Anything that shouldn't normally occur
  30. #define WARNINGS    0        // Something that can occur, but you might like to know about
  31.  
  32.  
  33. #define USE_LDEF            // Using the LDEF or including the source code
  34.  
  35.  
  36. enum
  37. {
  38.     // Generall application stuff
  39.     
  40.     kCreatorCode = 'tdem',                    // Tabs Demo
  41.     kSleepTime = 60L
  42.  
  43. };
  44.  
  45.  
  46.  
  47. enum
  48. {
  49.     // Menu ID numbers
  50.     
  51.     kMenuBarID = 1000,
  52.     kAppleMenu = 1000,
  53.     kFileMenu = 1001
  54. };
  55.  
  56.  
  57.  
  58. enum
  59. {
  60.     // Apple menu commands
  61.     
  62.     cAbout = 1
  63. };
  64.  
  65.  
  66.  
  67. enum
  68. {
  69.     // File menu commands
  70.     
  71.     cQuit = 1
  72. };
  73.  
  74.  
  75.  
  76.  
  77.  
  78.  
  79. enum
  80. {
  81.     // Error strings
  82.     
  83.     kNeedSystem7 = 1,
  84.     kGenericErrorStr
  85. };
  86.  
  87.  
  88.  
  89. enum
  90. {
  91.     // Windows
  92.  
  93.     kDisplayWindow = 1000,
  94.     kAboutDialog,
  95.      kErrorDialog
  96. };
  97.  
  98.  
  99.  
  100. enum
  101. {
  102.     // Strings
  103.  
  104.     kErrorStrings = 1000
  105. };
  106.  
  107.  
  108.  
  109.  
  110. #define kTabsLDEF        1000
  111.  
  112. typedef OSErr (*tContentsProcPtr) ( ListRef theList, void* refCon );
  113.  
  114.  
  115.  
  116.  
  117. // Global Variable Definitions. This allows me to include this file
  118. // in all sources with the extern keyword used in all instances except
  119. // the main source file.
  120.  
  121. #ifdef __MAIN__
  122.     #define    global
  123. #else
  124.     #define    global    extern
  125. #endif
  126.  
  127.  
  128. global    Boolean                    gQuit;                  /* quit program flag */
  129. global    SInt32                    gSleepTime;
  130.  
  131.  
  132.  
  133. #ifndef USE_LDEF
  134.     #define kLDEFID 0
  135. #else
  136.     #define kLDEFID    kTabsLDEF
  137. #endif
  138.  
  139.  
  140.  
  141.  
  142.  
  143.  
  144. #endif    // __BAREBONES__
  145.